package com.chalk.service;


import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.chalk.exception.ColumnNotEmptyException;
import com.chalk.model.News;
import com.chalk.vo.NewsVo;

import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author glq
 * @since 2020-12-19
 */

public interface NewsService extends IService<News> {


    /**
     * 资讯分页
     * @param map
     * @return
     */
    public Page<News> getNewsForPage(Map<String,Object> map)throws ColumnNotEmptyException;

    /**
     * 新增资讯
     * @param newsVo
     * @return
     */
    public Boolean saveNews(NewsVo newsVo);

    /**
     * 修改资讯
     * @param newsVo
     * @return
     */
    public Boolean updateNews(NewsVo newsVo);

    /**
     * 删除资讯
     * @param newsId
     * @return
     */
    public Boolean deleteNews(Integer newsId);

}
